<?php 

class Model {
	protected $dao;

	protected function initdao() {
	//初始化MySQLDB
	// var_dump($GLOBALS['conf']);DIE;
	$config = $GLOBALS['conf']['db'];

	switch($GLOBALS['conf']['App']['dao']) {

		case 'mysql': $dao_class = 'MySQLDB';break;
		case 'pdo': $dao_class = 'PDODB';
	}

	$this->dao = $dao_class::getInstance($config);
	}

	public function __construct() {
		$this->initdao();
	}
}